Skip to content

Conversation

notatallshaw
Copy link
Member

Fixes #12938

@notatallshaw notatallshaw force-pushed the remove-legacy-wheel-filename-support branch from 72d0aaf to c1550b3 Compare September 17, 2025 02:40
@notatallshaw notatallshaw force-pushed the remove-legacy-wheel-filename-support branch from c1550b3 to 3b1175e Compare September 17, 2025 02:40
@notatallshaw notatallshaw force-pushed the remove-legacy-wheel-filename-support branch from 3b1175e to a63ee68 Compare September 17, 2025 02:42
@notatallshaw
Copy link
Member Author

notatallshaw commented Sep 17, 2025

A real world example can be seen with https://pypi.org/project/password-strength, which have non-PEP 440 Python 2 wheel filenames.

Current behavior:

$ pip index versions password-strength
  DEPRECATION: Wheel filename 'password_strength-0.0.1_1-py2-none-any.whl' is not correctly normalised. Future versions of pip will raise the following error:
  Invalid wheel filename (invalid version): 'password_strength-0.0.1_1-py2-none-any'

   pip 25.3 will enforce this behaviour change. A possible replacement is to rename the wheel to use a correctly normalised name (this may require updating the version in the project metadata). Discussion can be found at https://github.com/pypa/pip/issues/12938
  DEPRECATION: Wheel filename 'password_strength-0.0.2_0-py2-none-any.whl' is not correctly normalised. Future versions of pip will raise the following error:
  Invalid wheel filename (invalid version): 'password_strength-0.0.2_0-py2-none-any'

   pip 25.3 will enforce this behaviour change. A possible replacement is to rename the wheel to use a correctly normalised name (this may require updating the version in the project metadata). Discussion can be found at https://github.com/pypa/pip/issues/12938
password-strength (0.0.3.post2)
Available versions: 0.0.3.post2, 0.0.3.post1, 0.0.3.post0, 0.0.2.post0, 0.0.1.post1, 0.0.1.post0

New behavior (no longer emits deprecation warning, versions taken from sdist):

$ pip index versions password-strength 
password-strength (0.0.3.post2)
Available versions: 0.0.3.post2, 0.0.3.post1, 0.0.3.post0, 0.0.2.post0, 0.0.1.post1, 0.0.1.post0

@notatallshaw notatallshaw added this to the 25.3 milestone Sep 17, 2025
@pradyunsg
Copy link
Member

Does verbose mode include information about why the artifact was skipped?

@notatallshaw
Copy link
Member Author

notatallshaw commented Sep 18, 2025

Does verbose mode include information about why the artifact was skipped?

Yeah, doing pip index -vv versions password-strength you will see lines like:

Skipping link: invalid wheel filename: https://files.pythonhosted.org/packages/e2/2a/95ea6a146467d376b7cf6810b6978653c9c589443c73bd4b0904c7215fdf/password_strength-0.0.1_1-py2-none-any.whl (from https://pypi.org/simple/password-strength/)

Directly specifying an invalid wheel filename will get you an ERROR message:

$ pip install --dry-run "https://huggingface.co/spacy/en_core_web_sm/resolve/main/en_core_web_sm-any-py3-none-any.whl"
ERROR: Invalid wheel filename (invalid version): 'en_core_web_sm-any-py3-none-any'

@notatallshaw notatallshaw merged commit 76fc136 into pypa:main Sep 19, 2025
28 checks passed
@notatallshaw
Copy link
Member Author

@pradyunsg thanks for your review! I'll be keeping an eye on on the next pip release for any community issues, but we've had surprisingly little feedback from the, probably too noisy, deprecation warning.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Removal of support for non-standard (PEP 440) wheel filenames

2 participants